package com.usabb.domain;


import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.ifast.common.base.BaseDO;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 
 * <pre>
 * 附件表
 * </pre>
 * <small> 2019-08-19 18:03:27 | Aron</small>
 */
@Data
@SuppressWarnings("serial")
@TableName("attach")
@EqualsAndHashCode(callSuper=true) 
public class AttachDO extends BaseDO {
	@TableId
	private Long id;

    /** 业务主键,如月子中心Id */
    private Long bizId;

    /** enum: center-月子中心, hospital-医院 */
    private String bizType;

    /** enum: list-列表页图片, detail-详情, banner */
    private String imageType;

    private String path;

    /** 文件类型 */
    private String fileType;

    /** 排序 */
    private Integer sorted;

    /** bak */
    private String title;

    /** bak */
    private String intro;

    /** bak */
    private String description;




    public static AttachDO of(Long bizId, String path) {
        AttachDO attachDO = new AttachDO();
        attachDO.setBizId(bizId);
        attachDO.setPath(path);

        return attachDO;
    }

    public static AttachDO ofCenter(Long bizId, String path) {
        AttachDO attachDO = AttachDO.of(bizId, path);
        attachDO.setBizType("CENTER");

        return attachDO;
    }

}
